//对外暴露默认路由
export const constRouter = [
  {
    //登录
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      show: false,
      icon: 'House',
    },
  },
  {
    //登录成功首页
    path: '/',
    name: 'layout',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '首页',
      show: false,
      icon: 'House',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          show: true,
          icon: 'HomeFilled',
        },
      },
    ],
  },
  {
    path: '/screen',
    name: 'Screen',
    component: () => import('@/views/screen/index.vue'),
    meta: {
      title: '数据大屏',
      show: true,
      icon: 'House',
    },
  },
  {
    //  权限管理
    path: '/acl',
    name: 'ACL',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '权限管理',
      show: true,
      icon: 'House',
    },
    redirect: '/acl/user',
    children: [
      {
        //用户管理
        path: '/acl/user',
        name: 'User',
        component: () => import('@/views/acl/user/index.vue'),
        meta: {
          title: '用户管理',
          show: true,
          icon: 'House',
        },
      },
      {
        //角色管理
        path: '/acl/role',
        name: 'Role',
        component: () => import('@/views/acl/role/index.vue'),
        meta: {
          title: '角色管理',
          show: true,
          icon: 'House',
        },
      },
      //菜单管理
      {
        path: '/acl/permission',
        name: 'Permission',
        component: () => import('@/views/acl/permission/index.vue'),
        meta: {
          title: '菜单管理',
          show: true,
          icon: 'House',
        },
      },
    ],
  },
  {
    //404页面
    path: '/404',
    name: '404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      title: '404',
      show: false,
      icon: 'House',
    },
  },
  {
    //上面页面都没有匹配上,重定向到404页面
    path: '/:pathMatch(.*)*',
    name: 'Any',
    redirect: '/404',
    meta: {
      title: '其它路由',
      show: false,
      icon: 'House',
    },
  },
]
